package com.huatech.core;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import com.huatech.core.conf.ScheduleConfig;


@ComponentScan(basePackages="com.huatech.core")
public class Bootstrap {
	
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		System.out.println("starting jar-demo ...");
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
		context.register(Bootstrap.class);
		context.register(ScheduleConfig.class);
		context.refresh();
		// 优雅停机
		context.registerShutdownHook();
	}

}
